<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>et</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Charisma, a fully featured, responsive, HTML5, Bootstrap admin template.">
    <meta name="author" content="Muhammad Usman">
<%@include file="/commons/commonJs.jsp"%>

<script type="text/javascript">

function showUser(data,divId){
	$("#"+divId).modal();
	$("#userName").val(data.userName);
	$("#passWord").val(data.passWord);
	$("#id").val(data.id);
}

function classTableShow(){
	$("#classTableShow").modal();
}

function classTableAdd(){
	$("#classTableAdd").modal();
}

function classTableEdit(){
	$("#classTableEdit").modal();
}

function classTableDel(){
	$("#classTableDel").modal();
}

function forAddWeekClass(){
$("#addClassTableRow").modal();
}
var rowid=11;
function addWeekClass(){
	$("#tb_weekClass").append('<tr id="tr_'+rowid+'">'+
           '<td>13:20<br>&nbsp;&nbsp;&nbsp;&nbsp;|<br>14:10<br><button class="btn btn-danger btn-xs" onclick="delWeekClass(\'tr_'+rowid+'\')">删除此行</button></td>'+
           '<td class="center"><button class="btn btn-primary btn-sm" onclick="classTableAdd()">新增课程</button></td>'+
           '<td class="center"><button class="btn btn-primary btn-sm" onclick="classTableAdd()">新增课程</button></td>'+
           '<td class="center"><button class="btn btn-primary btn-sm" onclick="classTableAdd()">新增课程</button></td>'+
           '<td class="center"><button class="btn btn-primary btn-sm" onclick="classTableAdd()">新增课程</button></td>'+
           '<td class="center"><button class="btn btn-primary btn-sm" onclick="classTableAdd()">新增课程</button></td>'+
           '<td class="center"><button class="btn btn-primary btn-sm" onclick="classTableAdd()">新增课程</button></td>'+
           '<td class="center"><button class="btn btn-primary btn-sm" onclick="classTableAdd()">新增课程</button></td>'+
       '</tr>');
       
       $("#addClassTableRow").modal('hide');
}


function delWeekClass(trid){
	$("#"+trid).remove();
}

 
function addWeekClass2(){
	var _tab=document.getElementById("tb_weekClass");
  var _row=_tab.insertRow();
  rowid+=1;
  var _col1=_row.insertCell();
  _col1.innerText=rowid;
  _col1.align="center";
  var _col2=_row.insertCell();
  _col2.innerHTML="<input type='text'>";
  _col2.align="center";
  var _col3=_row.insertCell();
  _col3.innerHTML="<input type='text'>";
  _col3.align="center";
  var _col4=_row.insertCell();
  _col4.innerHTML="<input type='text'>";
  _col4.align="center";
}
</script>
</head>

<body>

            <!-- content starts -->
                <div>
        <ul class="breadcrumb">
            <li>
                <a href="javascript:skipPage('<%=basePath%>mgt/login/content.do')">主页</a>
            </li>
            <li>
                <a href="#">本周课表</a>
            </li>
        </ul>
    </div>


        



    <div class="row">
    <div class="box col-md-12">
    <div class="box-inner">
    <div class="box-header well" data-original-title="">
        <h2><i class="glyphicon glyphicon-user"></i> 本周课表</h2>
		<a class="btn btn-round btn-primary" href="javascript:forAddWeekClass()" style="font-size:10px;float:right">
        		<i class="glyphicon glyphicon-edit icon-white"></i>新增一行</a>
        <!-- <div class="box-icon">
            <a href="#" class="btn btn-setting btn-round btn-default"><i class="glyphicon glyphicon-cog"></i></a>
            <a href="#" class="btn btn-minimize btn-round btn-default"><i
                    class="glyphicon glyphicon-chevron-up"></i></a>
            <a href="#" class="btn btn-close btn-round btn-default"><i class="glyphicon glyphicon-remove"></i></a>
        </div> -->
    </div>
    <div class="box-content">
    <table class="table table-bordered table-striped table-condensed" >
    <thead>
    <tr>
    	<th></th>
        <th>2015-06-15</th>
        <th>2015-06-16</th>
        <th>2015-06-17</th>
        <th>2015-06-18</th>
        <th>2015-06-19</th>
        <th>2015-06-20</th>
        <th>2015-06-21</th>
    </tr>
    <tr>
    	<th>时间</th>
        <th>Mon</th>
        <th>Tue</th>
        <th>Wed</th>
        <th>Thu</th>
        <th>Fri</th>
        <th>Sat</th>
        <th>Sun</th>
    </tr>
    </thead>
    <tbody id="tb_weekClass">
    
    
       <tr id="tr_1">
           <td>13:20<br>&nbsp;&nbsp;&nbsp;&nbsp;|<br>14:10<br><button class="btn btn-danger btn-xs" onclick="delWeekClass('tr_1')">删除此行</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classTableAdd()">新增课程</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classTableAdd()">新增课程</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classTableAdd()">新增课程</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classTableAdd()">新增课程</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classTableAdd()">新增课程</button></td>
           <td class="center">课名：daily life class<br>教师：Lisa<br>班级：1102A<br>级别：level2<br>人数：6<br>
            <button class="btn btn-success btn-xs" onclick="classTableShow()">view</button>
            <button class="btn btn-info btn-xs" onclick="classTableEdit()">edit</button>
            <button class="btn btn-danger btn-xs" onclick="classTableDel()">del</button>
           </td>
           <td class="center">课名：daily life class<br>教师：Lisa<br>班级：1102A<br>级别：level2<br>人数：6<br>
            <button class="btn btn-success btn-xs" onclick="classTableShow()">view</button>
            <button class="btn btn-info btn-xs" onclick="classTableEdit()">edit</button>
            <button class="btn btn-danger btn-xs" onclick="classTableDel()">del</button>
           </td>
       </tr>
       <tr id="tr_2">
           <td>13:20<br>&nbsp;&nbsp;&nbsp;&nbsp;|<br>14:10<br><button class="btn btn-danger btn-xs" onclick="delWeekClass('tr_2')">删除此行</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classTableAdd()">新增课程</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classTableAdd()">新增课程</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classTableAdd()">新增课程</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classTableAdd()">新增课程</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classTableAdd()">新增课程</button></td>
           <td class="center">课名：daily life class<br>教师：Lisa<br>班级：1102A<br>级别：level2<br>人数：6<br>
            <button class="btn btn-success btn-xs" onclick="classTableShow()">view</button>
            <button class="btn btn-info btn-xs" onclick="classTableEdit()">edit</button>
            <button class="btn btn-danger btn-xs" onclick="classTableDel()">del</button>
           </td>
           <td class="center">课名：daily life class<br>教师：Lisa<br>班级：1102A<br>级别：level2<br>人数：6<br>
            <button class="btn btn-success btn-xs" onclick="classInfoShow()">view</button>
            <button class="btn btn-info btn-xs" onclick="classInfoEdit()">edit</button>
            <button class="btn btn-danger btn-xs" onclick="classInfoDel()">del</button>
           </td>
       </tr>
       <tr id="tr_3">
           <td>13:20<br>&nbsp;&nbsp;&nbsp;&nbsp;|<br>14:10<br><button class="btn btn-danger btn-xs" onclick="delWeekClass('tr_3')">删除此行</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classInfoAdd()">新增课程</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classInfoAdd()">新增课程</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classInfoAdd()">新增课程</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classInfoAdd()">新增课程</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classInfoAdd()">新增课程</button></td>
           <td class="center">课名：daily life class<br>教师：Lisa<br>班级：1102A<br>级别：level2<br>人数：6<br>
            <button class="btn btn-success btn-xs" onclick="classInfoShow()">view</button>
            <button class="btn btn-info btn-xs" onclick="classInfoEdit()">edit</button>
            <button class="btn btn-danger btn-xs" onclick="classInfoDel()">del</button>
           </td>
           <td class="center">课名：daily life class<br>教师：Lisa<br>班级：1102A<br>级别：level2<br>人数：6<br>
            <button class="btn btn-success btn-xs" onclick="classInfoShow()">view</button>
            <button class="btn btn-info btn-xs" onclick="classInfoEdit()">edit</button>
            <button class="btn btn-danger btn-xs" onclick="classInfoDel()">del</button>
           </td>
       </tr>
       <tr id="tr_4">
           <td>13:20<br>&nbsp;&nbsp;&nbsp;&nbsp;|<br>14:10<br><button class="btn btn-danger btn-xs" onclick="delWeekClass('tr_4')">删除此行</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classInfoAdd()">新增课程</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classInfoAdd()">新增课程</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classInfoAdd()">新增课程</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classInfoAdd()">新增课程</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classInfoAdd()">新增课程</button></td>
           <td class="center">课名：daily life class<br>教师：Lisa<br>班级：1102A<br>级别：level2<br>人数：6<br>
            <button class="btn btn-success btn-xs" onclick="classInfoShow()">view</button>
            <button class="btn btn-info btn-xs" onclick="classInfoEdit()">edit</button>
            <button class="btn btn-danger btn-xs" onclick="classInfoDel()">del</button>
           </td>
           <td class="center">课名：daily life class<br>教师：Lisa<br>班级：1102A<br>级别：level2<br>人数：6<br>
            <button class="btn btn-success btn-xs" onclick="classInfoShow()">view</button>
            <button class="btn btn-info btn-xs" onclick="classInfoEdit()">edit</button>
            <button class="btn btn-danger btn-xs" onclick="classInfoDel()">del</button>
           </td>
       </tr>
       <tr id="tr_5">
           <td>13:20<br>&nbsp;&nbsp;&nbsp;&nbsp;|<br>14:10<br><button class="btn btn-danger btn-xs" onclick="delWeekClass('tr_5')">删除此行</button></td>
           <td class="center">课名：daily life class<br>教师：Lisa<br>班级：1102A<br>级别：level2<br>人数：6<br>
            <button class="btn btn-success btn-xs" onclick="classInfoShow()">view</button>
            <button class="btn btn-info btn-xs" onclick="classInfoEdit()">edit</button>
            <button class="btn btn-danger btn-xs" onclick="classInfoDel()">del</button>
           </td>
           <td class="center">课名：daily life class<br>教师：Lisa<br>班级：1102A<br>级别：level2<br>人数：6<br>
            <button class="btn btn-success btn-xs" onclick="classInfoShow()">view</button>
            <button class="btn btn-info btn-xs" onclick="classInfoEdit()">edit</button>
            <button class="btn btn-danger btn-xs" onclick="classInfoDel()">del</button>
           </td>
           <td class="center">课名：daily life class<br>教师：Lisa<br>班级：1102A<br>级别：level2<br>人数：6<br>
            <button class="btn btn-success btn-xs" onclick="classInfoShow()">view</button>
            <button class="btn btn-info btn-xs" onclick="classInfoEdit()">edit</button>
            <button class="btn btn-danger btn-xs" onclick="classInfoDel()">del</button>
           </td>
           <td class="center">课名：daily life class<br>教师：Lisa<br>班级：1102A<br>级别：level2<br>人数：6<br>
            <button class="btn btn-success btn-xs" onclick="classInfoShow()">view</button>
            <button class="btn btn-info btn-xs" onclick="classInfoEdit()">edit</button>
            <button class="btn btn-danger btn-xs" onclick="classInfoDel()">del</button>
           </td>
           <td class="center">课名：daily life class<br>教师：Lisa<br>班级：1102A<br>级别：level2<br>人数：6<br>
            <button class="btn btn-success btn-xs" onclick="classInfoShow()">view</button>
            <button class="btn btn-info btn-xs" onclick="classInfoEdit()">edit</button>
            <button class="btn btn-danger btn-xs" onclick="classInfoDel()">del</button>
           </td>
           <td class="center">课名：daily life class<br>教师：Lisa<br>班级：1102A<br>级别：level2<br>人数：6<br>
            <button class="btn btn-success btn-xs" onclick="classInfoShow()">view</button>
            <button class="btn btn-info btn-xs" onclick="classInfoEdit()">edit</button>
            <button class="btn btn-danger btn-xs" onclick="classInfoDel()">del</button>
           </td>
           <td class="center">课名：daily life class<br>教师：Lisa<br>班级：1102A<br>级别：level2<br>人数：6<br>
            <button class="btn btn-success btn-xs" onclick="classInfoShow()">view</button>
            <button class="btn btn-info btn-xs" onclick="classInfoEdit()">edit</button>
            <button class="btn btn-danger btn-xs" onclick="classInfoDel()">del</button>
           </td>
       </tr>
       <tr id="tr_6">
           <td>13:20<br>&nbsp;&nbsp;&nbsp;&nbsp;|<br>14:10<br><button class="btn btn-danger btn-xs" onclick="delWeekClass('tr_6')">删除此行</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classInfoAdd()">新增课程</button></td>
           <td class="center">课名：daily life class<br>教师：Lisa<br>班级：1102A<br>级别：level2<br>人数：6<br>
            <button class="btn btn-success btn-xs" onclick="classInfoShow()">view</button>
            <button class="btn btn-info btn-xs" onclick="classInfoEdit()">edit</button>
            <button class="btn btn-danger btn-xs" onclick="classInfoDel()">del</button>
           </td>
           <td class="center">课名：daily life class<br>教师：Lisa<br>班级：1102A<br>级别：level2<br>人数：6<br>
            <button class="btn btn-success btn-xs" onclick="classInfoShow()">view</button>
            <button class="btn btn-info btn-xs" onclick="classInfoEdit()">edit</button>
            <button class="btn btn-danger btn-xs" onclick="classInfoDel()">del</button>
           </td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classInfoAdd()">新增课程</button></td>
           <td class="center"><button class="btn btn-primary btn-sm" onclick="classInfoAdd()">新增课程</button></td>
           <td class="center">课名：daily life class<br>教师：Lisa<br>班级：1102A<br>级别：level2<br>人数：6<br>
            <button class="btn btn-success btn-xs" onclick="classInfoShow()">view</button>
            <button class="btn btn-info btn-xs" onclick="classInfoEdit()">edit</button>
            <button class="btn btn-danger btn-xs" onclick="classInfoDel()">del</button>
           </td>
           <td class="center">课名：daily life class<br>教师：Lisa<br>班级：1102A<br>级别：level2<br>人数：6<br>
            <button class="btn btn-success btn-xs" onclick="classInfoShow()">view</button>
            <button class="btn btn-info btn-xs" onclick="classInfoEdit()">edit</button>
            <button class="btn btn-danger btn-xs" onclick="classInfoDel()">del</button>
           </td>
       </tr>
       
    
    
    
    
    </tbody>
    </table>
    
    
    
    </div>
    </div>
    </div>
    <!--/span-->

    </div><!--/row-->








	<div class="modal fade" id="addClassTableRow" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
         aria-hidden="true">

        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">×</button>
                    <h3>新增一行课程</h3>
                </div>
                <div class="modal-body">
                	<fieldset>
                    <div class="form-group col-md-12">
                    <label class="control-label" for="classStartTime">课程开始时间</label>
                    <input type="text" class="form-control" name="classStartTime" value="" id="classStartTime" onclick="new WdatePicker({el:$dp.$('bftime'),dateFmt:'HH:mm'})">
                </div>
                <div class="form-group col-md-12">
                    <label class="control-label" for="classEndTime">课程结束时间</label>
                    <input type="text" class="form-control" name="classEndTime" value="" id="classEndTime" onclick="new WdatePicker({el:$dp.$('bftime'),dateFmt:'HH:mm'})">
                </div>
				  	
				</fieldset>  
                </div>
                <div class="modal-footer">
                    <a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>
                    <a href="#" class="btn btn-primary" href="javascript:AddWeekClass()">Save changes</a>
                </div>
            </div>
        </div>
    </div>








	<div class="modal fade" id="classTableShow" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
         aria-hidden="true">

        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">×</button>
                    <h3>课程信息</h3>
                </div>
                <div class="modal-body">
                	<fieldset>
                    <div class="form-group col-md-12">
                    <label class="control-label" for="userName">课名</label>
                    <input type="text" class="form-control" name="userName" value="daily life class" id="userName">
                </div>
                <div class="form-group col-md-12">
                    <label class="control-label" for="passWord">教师</label>
                    <input type="text" class="form-control" name="passWord" value="ida" id="passWord">
                </div>
                <div class="form-group col-md-12">
                    <label class="control-label" for="userName">班级</label>
                    <input type="text" class="form-control" name="userName" value="1101A" id="userName">
                </div>
                <div class="form-group col-md-12">
                    <label class="control-label" for="passWord">级别</label>
                    <input type="text" class="form-control" name="passWord" value="level2" id="passWord">
                </div>
				  	<div class="form-group col-md-12">
                    <label class="control-label" for="userName">限定人数</label>
                    <input type="text" class="form-control" name="userName" value="8" id="userName">
                </div>
                <div class="form-group col-md-12">
                    <label class="control-label" for="passWord">已报人数</label>
                    <input type="text" class="form-control" name="passWord" value="6" id="passWord">
                </div>
				  	
				</fieldset>  
                </div>
                <div class="modal-footer">
                    <a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>
                    <!-- <a href="#" class="btn btn-primary" data-dismiss="modal">Save changes</a> -->
                </div>
            </div>
        </div>
    </div>
    
    
    <div class="modal fade" id="classTableAdd" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
         aria-hidden="true">

        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">×</button>
                    <h3>新增课程</h3>
                </div>
                <div class="modal-body">
                	<fieldset>
                    <div class="form-group col-md-12">
                    <label class="control-label" for="userName">课名</label>
                    <input type="text" class="form-control" name="userName" value="" id="userName">
                </div>
                <div class="form-group col-md-12">
                    <label class="control-label" for="passWord">教师</label>
                    <input type="text" class="form-control" name="passWord" value="" id="passWord">
                </div>
                <div class="form-group col-md-12">
                    <label class="control-label" for="userName">班级</label>
                    <input type="text" class="form-control" name="userName" value="" id="userName">
                </div>
                <div class="form-group col-md-12">
                    <label class="control-label" for="passWord">级别</label>
                    <input type="text" class="form-control" name="passWord" value="" id="passWord">
                </div>
				  	<div class="form-group col-md-12">
                    <label class="control-label" for="userName">限定人数</label>
                    <input type="text" class="form-control" name="userName" value="" id="userName">
                </div>
                <div class="form-group col-md-12">
                    <label class="control-label" for="passWord">已报人数</label>
                    <input type="text" class="form-control" name="passWord" value="" id="passWord">
                </div>
				  	
				</fieldset>  
                </div>
                <div class="modal-footer">
                    <a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>
                    <a href="#" class="btn btn-primary" data-dismiss="modal">Save changes</a>
                </div>
            </div>
        </div>
    </div>
    
    
    <div class="modal fade" id="classTableEdit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
         aria-hidden="true">

        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">×</button>
                    <h3>编辑课程</h3>
                </div>
                <div class="modal-body">
                	<fieldset>
                    <div class="form-group col-md-12">
                    <label class="control-label" for="userName">课名</label>
                    <input type="text" class="form-control" name="userName" value="daily life class" id="userName">
                </div>
                <div class="form-group col-md-12">
                    <label class="control-label" for="passWord">教师</label>
                    <input type="text" class="form-control" name="passWord" value="ida" id="passWord">
                </div>
                <div class="form-group col-md-12">
                    <label class="control-label" for="userName">班级</label>
                    <input type="text" class="form-control" name="userName" value="1101A" id="userName">
                </div>
                <div class="form-group col-md-12">
                    <label class="control-label" for="passWord">级别</label>
                    <input type="text" class="form-control" name="passWord" value="level2" id="passWord">
                </div>
				  	<div class="form-group col-md-12">
                    <label class="control-label" for="userName">限定人数</label>
                    <input type="text" class="form-control" name="userName" value="8" id="userName">
                </div>
                <div class="form-group col-md-12">
                    <label class="control-label" for="passWord">已报人数</label>
                    <input type="text" class="form-control" name="passWord" value="6" id="passWord">
                </div>
				  	
				</fieldset>  
                </div>
                <div class="modal-footer">
                    <a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>
                    <a href="#" class="btn btn-primary" data-dismiss="modal">Save changes</a>
                </div>
            </div>
        </div>
    </div>
    
    <div class="modal fade" id="classTableDel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
         aria-hidden="true">

        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">×</button>
                    <h3>删除课程</h3>
                </div>
                <div class="modal-body">
                    <p>成功删除课程！</p>
                </div>
                <div class="modal-footer">
                    <a href="#" class="btn btn-default" data-dismiss="modal">Close</a>
                </div>
            </div>
        </div>
    </div>
    
    <!-- content ends -->


</body>
</html>
